package cn.kgc.springday05.staticproxy;

import cn.kgc.springday05.interfaces.Teacher;
import cn.kgc.springday05.interfaces.TeacherLi;
import org.springframework.stereotype.Component;

/**
 * @Author: 课工场
 * @Version: v1.0  2023/6/15
 * @Description:TeacherLi的代理类  静态代理类
 */
@Component
public class TeacherLiStaticProxy implements Teacher {
    private TeacherLi teacherLi =  new TeacherLi();

    @Override
    public String teachOnline(String course) {
        System.out.println("===========上课时间到了==============");
        String s = teacherLi.teachOnline(course);
        System.out.println("===========下课时间到了==============");
        return s;
    }

    @Override
    public String teachOffline(String course) {
        System.out.println("===========上课时间到了==============");
        String s = teacherLi.teachOffline(course);
        System.out.println("===========下课时间到了==============");
        return s;
    }
}
